import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import HomeRecommend from '../views/homeView/HomeRecommendView.vue'
import MyAttention from '../views/homeView/MyAttentionView.vue'
import AllRecommend from '../views/homeView/AllRecommendView.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: {name:'homerecommend'},
    children:[
      {path:'/homerecommend',name:'homerecommend',component:HomeRecommend},
      {path:'/myattention',name:'myAttention',component:MyAttention},
      {path:'/allrecommend',name:'allrecommend',component:AllRecommend}
    ]
  },
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
